package cn.kjcoder.orderServer.feign.fallBack;

import cn.kjcoder.orderServer.feign.ProductFeignApi;
import cn.kjcoder.productServer.domain.Product;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

/**
 * @author hkj
 * @email 1349091387@qq.com
 * @date 2021/12/23
 * 源码允许修改，并且本人十分乐意有 大佬 来对代码进行 随 意 调 教
 **/
@Component
public class ProductFeignFallBack implements ProductFeignApi {

    @Override
    public Product findById(Long id) {
        Product product = new Product();
        product.setPid(-1L);
        product.setPname("兜底数据");
        product.setPprice(0.0);
        return product;
    }
}
